<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>Document</title>
<link rel="stylesheet" href="../assets/agile/css/ratchet/css/ratchet.min.css">
<link rel="stylesheet" href="../assets/agile/css/flat/flat.component.css">
<link rel="stylesheet" href="../assets/agile/css/flat/flat.color.css">
<link rel="stylesheet" href="../assets/agile/css/flat/iconline.css">
<link rel="stylesheet" href="../assets/app/css/app.css" />
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/local.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
</head>
<body>

<!--通用顶部-->
<div id="ios-top-box">
    <div id="header" class="bar bar-nav">
    <div class="titlebar">
    <a href="javascript:appClose('singlelister',api);"><i class="iconfont iconline-arrow-left"></i></a>
    <h1 class="title">晒单-单人抢购</h1>
    </div>
    </div>
</div>
<!--通用顶部结束-->

<header class="bar bar-nav box_shadow head_a" style="margin-top:43px;">
<a href="javascript:randomSwitchBtn('singlelist',api);" style="width:50%;">已晒单</a>
<a href="javascript:randomSwitchBtn('singlelister',api);" style="width:50%;" class="selected_bottom">未晒单</a>
<!--<a href="?/mobile/home/tsinglelist" style="width:33.3%;">参团晒单</a>-->
</header>

<section class="notBottom" style="margin-top:110px !important;">
    <div class="scroller create_goods">
        
    </div>
</section>

<script type="text/javascript" charset="utf-8">

    var userinfo;
    if(userinfo = getUserinfo()){
        apiready = function(){
          api.showProgress({title : '加载中',text : ''});
        setInterval(function(){
            var sd_ok_id = localData.get('sd_ok_id');
            if(sd_ok_id){
                $('#listitem'+sd_ok_id).remove();
            }
        },1000);

    	GetJPData(config.url+'/app.php?act=singlelister&uid='+userinfo['uid'],{},function(data){
    	    api.hideProgress();
    	    var html = "";
    	    if(data['status'] == 1){
    	        for(var i in data['data']){
                    html +='<ul id="listitem'+data['data'][i]['id']+'" class="listitem group_listitem">';
                    html +='<li style="border-bottom:1px solid #e4e4e4;">';
                    html +='<img data-original="'+config.upload_url+'/'+data['data'][i]['thumb']+'" width="70px" height="70px" class="lazy img"/>';
                    html +='<div class="text">';
                    html +='<p style="height:43px;overflow:hidden;padding-right:20px;">'+data['data'][i]['title']+'</p>';
                    html +='<p><span style="float:right;">';
                    html +='<a href="javascript:openItem(\'singleinsert\','+data['data'][i]['id']+',function(id){localData.set(\'sd_order_id\',id);});">';
                    html +='</a></span></p>';
                    html +='<p style="text-align:right;padding-top:10px;"><a href="javascript:openItem(\'singleinsert\','+data['data'][i]['id']+',function(id){localData.set(\'sd_order_id\',id);});" style="color:#f60;">去晒单</a></p>';
                    html +='</div></li></ul>';
    	        }
    	        $('.scroller').html(html);
    	        lyzimg();
    	    }else{
    	       html += '<ul class="listitem group_listitem">';
                  html += '<li>';
                  html += '<p style="text-align: center;">暂无记录</p>';
                  html += '</li></ul>';
                  $('.scroller').html(html);
    	    }
    	});
    	
      };
	}else{
        $.PageDialog.fail('请登录用户');
    }
</script>
</body>
</html>